<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>上传个人电子简历</title>
    <link rel="stylesheet" href="/dev/plugins/bootstrap/css/bootstrap.css">
    <link rel="stylesheet" href="/dev/plugins/layui/layui/css/layui.css">
    <link rel="stylesheet" href="/dev/assets/css/job/page/JianLi.css">
    <link rel="icon" href="/dev/assets/img/geek-job/wanli.jpg" type="image/x-icon">
    <script>
        e();
        function e () {
            // 在这里执行条件检查
            let token = localStorage.getItem("token")
            if (token==null) {
                // 执行页面跳转
                window.location.href = '/dev/views/job/page/login.html';
            }
        }
    </script>
</head>
<body>
<div id="nav"></div>
<div id="wrap" class="wrap-sign">
    <div class="page-sign">
<!--        <div id="header"></div>-->
        <div class="notes-parase">
            <div class="notes-box">
                <a href="#" class="logo">
                    <img src="/dev/assets/img/gg.jpg">
                    <div class="desc">
                        <em>找工作</em>
                        <p>就找职途万里</p>
                    </div>
                </a>
                <ul class="desc-list">
                    <li>
                        <i class="notes notes-chat"></i>
                        <em>沟通</em>
                        <sp>在线职位及时沟通</sp>
                    </li>
                    <li>
                        <i class="notes-select"></i>
                        <em>随便选</em>
                        <span>各大职业任你选</span>
                    </li>
                </ul>
            </div>
            <!---->
            <div class="notes-content">
                <div class="inner-box">
                    <h4>请上传您的简历</h4>
                    <div class="nontes-title">
                        "建议使用PDF文件，支持DOC、DOCX格式"
                        <br>
                        <span class="notes-red">文件大小不能超过8M</span>
                    </div>
                    <div class="layui-upload-drag" style="display: block;" id="ID-upload-demo-drag">
                        <i class="layui-icon layui-icon-upload"></i>
                        <div>将文件拖拽到此处</div>
<!--                        <div class="layui-hide" id="ID-upload-demo-preview">-->
<!--                            <hr> <img src="" alt="上传成功后渲染" style="max-width: 100%">-->
<!--                        </div>-->
                    </div>
                    <div class="layui-btn-container">
                        <button type="button" class="layui-btn" id="ID-upload-demo-action">开始上传</button>
                    </div>
                    <div style="width: 360px;">
                        <div class="layui-progress layui-progress-big" lay-showpercent="yes" lay-filter="demo">
                            <div class="layui-progress-bar" lay-percent=""></div>
                        </div>
                    </div>
                    <a href="/dev/views/job/page/resume.html" class="outline-btn">
                        没有附件简历？
                        <span class="notes-text">
                                在线填写
                            </span>
                    </a>
                    <div class="upload-policy">
                            <span class="notes-agree">
                                <input type="checkbox" class="agree-text">
                                <i class="checkbox-ending"></i>
                            </span>
                        <em>同意授权,不登陆简历会自动清除</em>
                    </div>
                </div>
                <!---->

            </div>

        </div>

    </div>
</div>




<!--必须先引入jquery.min.js-->
<script src="/dev/plugins/jquery/jquery.min.js"></script>
<script src="/dev/plugins/bootstrap/js/bootstrap.js"></script>
<script src="/dev/plugins/layui/layui/layui.js"></script>
<script>
    $("#nav").load("/dev/views/common/nav.html")

    layui.use(function(){
        var upload = layui.upload;
        var $ = layui.jquery
            , upload = layui.upload
            , element = layui.element
            , layer = layui.layer;
        // 渲染
        upload.render({
            headers:{
                "id":localStorage.getItem("id"),
                "token":localStorage.getItem("token")
            },
            elem: '#ID-upload-demo-drag',
            url: '/dev/curriculum/file', // 实际使用时改成您自己的上传接口即可。
            accept:'file',
            auto: false,
            bindAction: '#ID-upload-demo-action',
            done: function(res){
                layer.msg('上传成功');
                $('#ID-upload-demo-preview').removeClass('layui-hide')
                    .find('img').attr('src', `http://${res.data.imageUrl[0]}`);
                window.location='/dev/views/job/page/resume.html'
            }
            ,progress: function(n, elem, e){
                element.progress('demo', n + '%'); //可配合 layui 进度条元素使用
                if(n == 100){
                    layer.msg('上传完毕', {icon: 1});
                }

            }
        });
    });
</script>

</body>
</html>